

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=&#34;auto&#34;>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/img/favicon.png">
  <link rel="icon" type="image/png" href="/img/favicon.png">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="description" content="CodeHope">
  <meta name="author" content="CodeHope">
  <meta name="keywords" content="希望">
  <title>Windows安装mysql-8.0.23版本总结 - CodeHope</title>

  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" />


  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css@4.0.0/github-markdown.min.css" />
  <link  rel="stylesheet" href="/lib/hint/hint.min.css" />

  
    
    
      
      
        
          
          
          
        
        <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.22.0/themes/prism-tomorrow.min.css" />
      
      
        <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.22.0/plugins/line-numbers/prism-line-numbers.min.css" />
      
    
  

  
    <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
  



<!-- 主题依赖的图标库，不要自行修改 -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_ba1fz6golrf.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_kmeydafke9r.css">


<link  rel="stylesheet" href="/css/main.css" />

<!-- 自定义样式保持在最底部 -->


  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    var CONFIG = {"hostname":"quancundexiwang.wang","root":"/","version":"1.8.7","typing":{"enable":true,"typeSpeed":70,"cursorChar":"_","loop":false},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"left","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":true,"trickleSpeed":100}},"copy_btn":true,"image_zoom":{"enable":true},"toc":{"enable":true,"headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":true,"onlypost":true},"web_analytics":{"enable":false,"baidu":null,"google":null,"gtag":null,"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":"Mi65hxq7VAFUDwOLeIGAOgiV-gzGzoHsz","app_key":"hMuhiD4FRqhns4giqLiEH9HG","server_url":null}}};
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
<meta name="generator" content="Hexo 5.3.0"></head>


<body>
  <header style="height: 80vh;">
    <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand"
       href="/">&nbsp;<strong>CodeHope</strong>&nbsp;</a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                村头
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/">
                <i class="iconfont icon-archive-fill"></i>
                归档
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/">
                <i class="iconfont icon-category-fill"></i>
                分类
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                标签
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                我
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" data-toggle="modal" data-target="#modalSearch">&nbsp;<i
                class="iconfont icon-search"></i>&nbsp;</a>
          </li>
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" href="javascript:">&nbsp;<i
                class="iconfont icon-dark" id="color-toggle-icon"></i>&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

    <div class="banner" id="banner" parallax=true
         style="background: url('https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1313430092,4065359957&fm=26&gp=0.jpg') repeat center center;
           background-size: cover;">
      <div class="full-bg-img">
        <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
          <div class="page-header text-center fade-in-up">
            <span class="h2" id="subtitle" title="Windows安装mysql-8.0.23版本总结">
              
            </span>

            
              <div class="mt-3">
  
  
    <span class="post-meta">
      <i class="iconfont icon-date-fill" aria-hidden="true"></i>
      <time datetime="2021-02-05 10:08" pubdate>
        2021年2月5日 上午
      </time>
    </span>
  
</div>

<div class="mt-1">
  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-chart"></i>
      1.2k 字
    </span>
  

  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-clock-fill"></i>
      
      
      17
       分钟
    </span>
  

  
  
</div>

            
          </div>

          
            <div class="scroll-down-bar">
              <i class="iconfont icon-arrowdown"></i>
            </div>
          
        </div>
      </div>
    </div>
  </header>

  <main>
    
      

<div class="container-fluid nopadding-x">
  <div class="row nomargin-x">
    <div class="d-none d-lg-block col-lg-2"></div>
    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div class="py-5" id="board">
          <article class="post-content mx-auto">
            <!-- SEO header -->
            <h1 style="display: none">Windows安装mysql-8.0.23版本总结</h1>
            
            <div class="markdown-body">
              <h1 id="Windows安装mysql-8-0-23版本总结"><a href="#Windows安装mysql-8-0-23版本总结" class="headerlink" title="Windows安装mysql-8.0.23版本总结"></a>Windows安装mysql-8.0.23版本总结</h1><h2 id="安装MYSQL"><a href="#安装MYSQL" class="headerlink" title="安装MYSQL"></a>安装MYSQL</h2><p> 首先去下载！</p>
<p><a target="_blank" rel="noopener" href="https://dev.mysql.com/downloads/mysql/">https://dev.mysql.com/downloads/mysql/</a></p>
<p><img src="http://qiniuyun.quancundexiwang.wang/image-20210205081831129.png" srcset="/img/loading.gif" alt="image-20210205081831129"></p>
<p>解压到你喜欢的地方</p>
<div class="code-wrapper"><pre class="line-numbers language-powershell" data-language="powershell"><code class="language-powershell">D:\env\mysql<span class="token operator">-</span>8<span class="token punctuation">.</span>0<span class="token punctuation">.</span>23<span class="token operator">-</span>winx64<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div>
<p>进入到安装好的bin目录</p>
<div class="code-wrapper"><pre class="line-numbers language-powershell" data-language="powershell"><code class="language-powershell">D:\env\mysql<span class="token operator">-</span>8<span class="token punctuation">.</span>0<span class="token punctuation">.</span>23<span class="token operator">-</span>winx64\bin<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div>
<p>编写MySQL的配置文件 <code>my.ini</code></p>
<div class="code-wrapper"><pre class="line-numbers language-ini" data-language="ini"><code class="language-ini"><span class="token selector">[mysqld]</span>
<span class="token comment"># 设置3306端口</span>
<span class="token constant">port</span><span class="token attr-value"><span class="token punctuation">=</span>3306</span>
<span class="token comment"># 设置mysql的安装目录</span>
<span class="token constant">basedir</span><span class="token attr-value"><span class="token punctuation">=</span>D:\env\mysql-8.0.23-winx64   </span>
<span class="token comment"># 设置mysql数据库的数据的存放目录</span>
<span class="token constant">datadir</span><span class="token attr-value"><span class="token punctuation">=</span>D:\env\mysql-8.0.23-winx64\Data  </span>
<span class="token comment"># 允许最大连接数</span>
<span class="token constant">max_connections</span><span class="token attr-value"><span class="token punctuation">=</span>200</span>
<span class="token comment"># 允许连接失败的次数。这是为了防止有人从该主机试图攻击数据库系统</span>
<span class="token constant">max_connect_errors</span><span class="token attr-value"><span class="token punctuation">=</span>10</span>
<span class="token comment"># 服务端使用的字符集默认为UTF8</span>
<span class="token constant">character-set-server</span><span class="token attr-value"><span class="token punctuation">=</span>UTF8MB3</span>
<span class="token comment"># 创建新表时将使用的默认存储引擎</span>
<span class="token constant">default-storage-engine</span><span class="token attr-value"><span class="token punctuation">=</span>INNODB</span>
<span class="token comment"># 默认使用“mysql_native_password”插件认证</span>
<span class="token constant">default_authentication_plugin</span><span class="token attr-value"><span class="token punctuation">=</span>mysql_native_password</span>
<span class="token selector">[mysql]</span>
<span class="token comment"># 设置mysql客户端默认字符集</span>
<span class="token constant">default-character-set</span><span class="token attr-value"><span class="token punctuation">=</span>UTF8MB3,</span>
<span class="token selector">[client]</span>
<span class="token comment"># 设置mysql客户端连接服务端时默认使用的端口</span>
<span class="token constant">port</span><span class="token attr-value"><span class="token punctuation">=</span>3306</span>
<span class="token constant">default-character-set</span><span class="token attr-value"><span class="token punctuation">=</span>UTF8MB3</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre></div>


<p>初始化<code>Mysql</code></p>
<div class="code-wrapper"><pre class="line-numbers language-powershell" data-language="powershell"><code class="language-powershell">mysqld <span class="token operator">--</span>initialize <span class="token operator">--</span>console<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div>
<div class="code-wrapper"><pre class="line-numbers language-powershell" data-language="powershell"><code class="language-powershell">Suggestion <span class="token punctuation">[</span>3<span class="token punctuation">,</span>General<span class="token punctuation">]</span>: 找不到命令 mysqld，但它确实存在于当前位置。默认情况下，Windows PowerShell 不会从当前位置加载命令。如果信任此命令，请改为键入“<span class="token punctuation">.</span>\mysqld”。有关详细信息，请参 阅 <span class="token string">"get-help about_Command_Precedence"</span>。
<span class="token function">PS</span> D:\env\mysql<span class="token operator">-</span>8<span class="token punctuation">.</span>0<span class="token punctuation">.</span>23<span class="token operator">-</span>winx64\bin> <span class="token punctuation">.</span>\mysqld <span class="token operator">--</span>initialize <span class="token operator">--</span>console
2021<span class="token operator">-</span>02<span class="token operator">-</span>05T00:24:00<span class="token punctuation">.</span>556304Z 0 <span class="token namespace">[System]</span> <span class="token namespace">[MY-013169]</span> <span class="token namespace">[Server]</span> D:\env\mysql<span class="token operator">-</span>8<span class="token punctuation">.</span>0<span class="token punctuation">.</span>23<span class="token operator">-</span>winx64\bin\mysqld<span class="token punctuation">.</span>exe <span class="token punctuation">(</span>mysqld 8<span class="token punctuation">.</span>0<span class="token punctuation">.</span>23<span class="token punctuation">)</span> initializing of server in progress as <span class="token keyword">process</span> 3376
2021<span class="token operator">-</span>02<span class="token operator">-</span>05T00:24:00<span class="token punctuation">.</span>557134Z 0 <span class="token namespace">[Warning]</span> <span class="token namespace">[MY-013243]</span> <span class="token namespace">[Server]</span> <span class="token operator">--</span>character<span class="token operator">-</span><span class="token function">set-server</span>: The character <span class="token function">set</span> UTF8MB3 is deprecated and will be removed in a future release<span class="token punctuation">.</span> Please consider <span class="token keyword">using</span> UTF8MB4 instead<span class="token punctuation">.</span>
2021<span class="token operator">-</span>02<span class="token operator">-</span>05T00:24:00<span class="token punctuation">.</span>561905Z 1 <span class="token namespace">[System]</span> <span class="token namespace">[MY-013576]</span> <span class="token namespace">[InnoDB]</span> InnoDB initialization has started<span class="token punctuation">.</span>
2021<span class="token operator">-</span>02<span class="token operator">-</span>05T00:24:01<span class="token punctuation">.</span>923457Z 1 <span class="token namespace">[System]</span> <span class="token namespace">[MY-013577]</span> <span class="token namespace">[InnoDB]</span> InnoDB initialization has ended<span class="token punctuation">.</span>
2021<span class="token operator">-</span>02<span class="token operator">-</span>05T00:24:03<span class="token punctuation">.</span>431647Z 6 <span class="token namespace">[Note]</span> <span class="token namespace">[MY-010454]</span> <span class="token namespace">[Server]</span> A temporary password is generated <span class="token keyword">for</span> root@localhost: =guiw<span class="token operator">*</span>KOk61P 
<span class="token comment"># =guiw*KOk61P   这里有个临时密码一定要注意，如果忘记关了就把生成的Data文件夹删了，重新执行一遍这个操作</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre></div>
<p>这个时候<code>Mysql</code>初始化已经完成了</p>
<p><span style='color:red'>无默认密码版本初始化</span>    </p>
<div class="code-wrapper"><pre class="line-numbers language-powershell" data-language="powershell"><code class="language-powershell">mysqld –<span class="token function">initialize-insecure</span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div>
<p>安装<code>Mysql服务</code></p>
<div class="code-wrapper"><pre class="line-numbers language-powershell" data-language="powershell"><code class="language-powershell">mysqld <span class="token operator">--</span>install

<span class="token function">PS</span> D:\env\mysql<span class="token operator">-</span>8<span class="token punctuation">.</span>0<span class="token punctuation">.</span>23<span class="token operator">-</span>winx64\bin> <span class="token punctuation">.</span>\mysqld <span class="token operator">--</span>install
Service successfully installed<span class="token punctuation">.</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span></span></code></pre></div>
<p><img src="http://qiniuyun.quancundexiwang.wang/image-20210205083114501.png" srcset="/img/loading.gif" alt="image-20210205083114501"></p>
<p>已经安装在了window的服务中</p>
<p>启动 <code>Mysql</code></p>
<div class="code-wrapper"><pre class="line-numbers language-powershell" data-language="powershell"><code class="language-powershell">net <span class="token function">start</span> mysql

<span class="token function">PS</span> D:\env\mysql<span class="token operator">-</span>8<span class="token punctuation">.</span>0<span class="token punctuation">.</span>23<span class="token operator">-</span>winx64\bin> net <span class="token function">start</span> mysql
MySQL 服务正在启动 <span class="token punctuation">.</span>
MySQL 服务已经启动成功。<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span></span></code></pre></div>
<p>关闭<code>Mysql</code>服务</p>
<div class="code-wrapper"><pre class="line-numbers language-powershell" data-language="powershell"><code class="language-powershell">net stop mysql
<span class="token function">PS</span> D:\env\mysql<span class="token operator">-</span>8<span class="token punctuation">.</span>0<span class="token punctuation">.</span>23<span class="token operator">-</span>winx64\bin> net stop mysql
MySQL 服务正在停止<span class="token punctuation">.</span>
MySQL 服务已成功停止。<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span></span></code></pre></div>
<p>使用<code>Navicat</code>测试连接</p>
<p><img src="http://qiniuyun.quancundexiwang.wang/image-20210205083704026.png" srcset="/img/loading.gif" alt="image-20210205083704026"></p>
<p>命令行测试连接数据库</p>
<div class="code-wrapper"><pre class="line-numbers language-powershell" data-language="powershell"><code class="language-powershell"><span class="token function">PS</span> C:\Windows\system32> cd D:\env\mysql<span class="token operator">-</span>8<span class="token punctuation">.</span>0<span class="token punctuation">.</span>23<span class="token operator">-</span>winx64\bin\
<span class="token function">PS</span> D:\env\mysql<span class="token operator">-</span>8<span class="token punctuation">.</span>0<span class="token punctuation">.</span>23<span class="token operator">-</span>winx64\bin> <span class="token punctuation">.</span>\mysql <span class="token operator">-</span>u root <span class="token operator">-</span>p
Enter password: <span class="token operator">*</span>*<span class="token operator">*</span>*<span class="token operator">*</span>*<span class="token operator">*</span>*<span class="token operator">*</span>*<span class="token operator">*</span><span class="token operator">*</span>
Welcome to the MySQL monitor<span class="token punctuation">.</span>  Commands <span class="token keyword">end</span> with <span class="token punctuation">;</span> or \g<span class="token punctuation">.</span>
Your MySQL connection id is 16
Server version: 8<span class="token punctuation">.</span>0<span class="token punctuation">.</span>23

Copyright <span class="token punctuation">(</span>c<span class="token punctuation">)</span> 2000<span class="token punctuation">,</span> 2021<span class="token punctuation">,</span> Oracle and<span class="token operator">/</span>or its affiliates<span class="token punctuation">.</span>

Oracle is a registered trademark of Oracle Corporation and<span class="token operator">/</span>or its
affiliates<span class="token punctuation">.</span> Other names may be trademarks of their respective
owners<span class="token punctuation">.</span>

<span class="token function">Type</span> <span class="token string">'help;'</span> or <span class="token string">'\h'</span> <span class="token keyword">for</span> help<span class="token punctuation">.</span> <span class="token function">Type</span> <span class="token string">'\c'</span> to clear the current input statement<span class="token punctuation">.</span>

mysql><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre></div>
<p>修改默认密码</p>
<h2 id="配置-MYSQL目录的全局环境变量"><a href="#配置-MYSQL目录的全局环境变量" class="headerlink" title="配置 MYSQL目录的全局环境变量"></a>配置 <code>MYSQL</code>目录的全局环境变量</h2><blockquote>
<p>我们在上面的操作全都是去到 <code> D:\env\mysql-8.0.23-winx64\bin&gt;</code>目录下去执行里面的程序文件，那么如果我们想在任意地方能直接进行操作的话，就需要配置全局的环境变量</p>
</blockquote>
<p>首先在环境变量中增加一个新的变量</p>
<p>变量名;<code>MYSQL_HOME</code> </p>
<p>变量值：bin目录的路径（因为不管是安装还是启动，都是执行bin目录下的文件） <code>D:\env\mysql-8.0.23-winx64\bin</code></p>
<p><img src="http://qiniuyun.quancundexiwang.wang/image-20210205084923689.png" srcset="/img/loading.gif" alt="image-20210205084923689"></p>
<p>然后把我们新建的<code>MYSQL_HOME</code>的环境变量添加到 全局的<code>PATH</code>中</p>
<p><img src="http://qiniuyun.quancundexiwang.wang/image-20210205085053276.png" srcset="/img/loading.gif" alt="image-20210205085053276"></p>
<div class="code-wrapper"><pre class="line-numbers language-powershell" data-language="powershell"><code class="language-powershell"><span class="token function">PS</span> C:\Windows\system32> mysql <span class="token operator">-</span>u root <span class="token operator">-</span>p
Enter password:<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span></span></code></pre></div>
<p>成功！</p>
<h2 id="Mysql的完全卸载"><a href="#Mysql的完全卸载" class="headerlink" title="Mysql的完全卸载"></a>Mysql的完全卸载</h2><p>首先停掉<code>mysql服务</code>,然后删除<code>mysql</code>服务</p>
<div class="code-wrapper"><pre class="line-numbers language-powershell" data-language="powershell"><code class="language-powershell"><span class="token function">PS</span> C:\Windows\system32> net stop mysql
MySQL 服务正在停止<span class="token punctuation">.</span>
MySQL 服务已成功停止。

<span class="token function">PS</span> C:\Windows\system32> mysqld remove mysql
Service successfully removed<span class="token punctuation">.</span>
<span class="token function">PS</span> C:\Windows\system32><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre></div>
<p><img src="http://qiniuyun.quancundexiwang.wang/image-20210205085456833.png" srcset="/img/loading.gif" alt="image-20210205085456833"></p>
<p>发现已经找不到mysql服务了</p>
<p>注册表路径删除</p>
<div class="code-wrapper"><pre class="line-numbers language-powershell" data-language="powershell"><code class="language-powershell">计算机\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\EventLog\Application\MySQLD Service<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div>
<p>然后把mysql的安装文件夹删掉就可以了，需要的话把环境变量也去删了</p>
<p><img src="http://qiniuyun.quancundexiwang.wang/image-20210205085629207.png" srcset="/img/loading.gif" alt="image-20210205085629207"></p>
<h2 id="修改Mysql的默认密码"><a href="#修改Mysql的默认密码" class="headerlink" title="修改Mysql的默认密码"></a>修改<code>Mysql的默认密码</code></h2><p>首先进入<code>mysql console</code></p>
<div class="code-wrapper"><pre class="line-numbers language-powershell" data-language="powershell"><code class="language-powershell"><span class="token function">PS</span> C:\Windows\system32> mysql <span class="token operator">-</span>u root <span class="token operator">-</span>p<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div>
<p>旧版本</p>
<div class="code-wrapper"><pre class="line-numbers language-mysql" data-language="mysql"><code class="language-mysql">set password for root@localhost &#x3D; password(&#39;123&#39;);<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div>
<p>新版本</p>
<div class="code-wrapper"><pre class="line-numbers language-mysql" data-language="mysql"><code class="language-mysql">alter user &#39;root&#39;@&#39;localhost&#39; identified by &#39;123&#39;;<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div>
<p>我们是<code>8.x</code>版本肯定最新版本的命令啦~</p>
<div class="code-wrapper"><pre class="line-numbers language-powershell" data-language="powershell"><code class="language-powershell">mysql> alter user <span class="token string">'root'</span>@<span class="token string">'localhost'</span> identified by <span class="token string">'123'</span><span class="token punctuation">;</span>
Query OK<span class="token punctuation">,</span> 0 rows affected <span class="token punctuation">(</span>0<span class="token punctuation">.</span>00 sec<span class="token punctuation">)</span>

mysql> quit
Bye
<span class="token function">PS</span> C:\Windows\system32> mysql <span class="token operator">-</span>u root <span class="token operator">-</span>p
Enter password: <span class="token operator">*</span>*<span class="token operator">*</span>
Welcome to the MySQL monitor<span class="token punctuation">.</span>  Commands <span class="token keyword">end</span> with <span class="token punctuation">;</span> or \g<span class="token punctuation">.</span>
Your MySQL connection id is 9
Server version: 8<span class="token punctuation">.</span>0<span class="token punctuation">.</span>23 MySQL Community Server <span class="token operator">-</span> GPL

Copyright <span class="token punctuation">(</span>c<span class="token punctuation">)</span> 2000<span class="token punctuation">,</span> 2021<span class="token punctuation">,</span> Oracle and<span class="token operator">/</span>or its affiliates<span class="token punctuation">.</span>

Oracle is a registered trademark of Oracle Corporation and<span class="token operator">/</span>or its
affiliates<span class="token punctuation">.</span> Other names may be trademarks of their respective
owners<span class="token punctuation">.</span>

<span class="token function">Type</span> <span class="token string">'help;'</span> or <span class="token string">'\h'</span> <span class="token keyword">for</span> help<span class="token punctuation">.</span> <span class="token function">Type</span> <span class="token string">'\c'</span> to clear the current input statement<span class="token punctuation">.</span>

mysql><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre></div>
<p>密码被重新改为123啦！</p>

            </div>
            <hr>
            <div>
              <div class="post-metas mb-3">
                
                  <div class="post-meta mr-3">
                    <i class="iconfont icon-category"></i>
                    
                      <a class="hover-with-bg" href="/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%9F%BA%E7%A1%80/">计算机基础</a>
                    
                  </div>
                
                
                  <div class="post-meta">
                    <i class="iconfont icon-tags"></i>
                    
                      <a class="hover-with-bg" href="/tags/mysql/">mysql</a>
                    
                  </div>
                
              </div>
              
                <p class="note note-warning">本博客所有文章除特别声明外，均采用 <a target="_blank" href="https://creativecommons.org/licenses/by-sa/4.0/deed.zh" rel="nofollow noopener noopener">CC BY-SA 4.0 协议</a> ，转载请注明出处！</p>
              
              
                <div class="post-prevnext">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/posts/21163/">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">Java中对象的多态</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/posts/43531/">
                        <span class="hidden-mobile">Javascript-重学es之es6中装饰器Decorator</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
              <!-- Comments -->
              <article class="comments" id="comments">
                
                
  <div id="vcomments"></div>
  <script type="text/javascript">
    Fluid.utils.waitElementVisible('vcomments', function() {
      Fluid.utils.createScript('https://cdn.jsdelivr.net/npm/valine@1.4.14/dist/Valine.min.js', function () {
        new Valine({
          el: "#vcomments",
          app_id: "Mi65hxq7VAFUDwOLeIGAOgiV-gzGzoHsz",
          app_key: "hMuhiD4FRqhns4giqLiEH9HG",
          placeholder: "说点什么",
          path: window.location.pathname,
          avatar: "retro",
          meta: ["nick","mail","link"],
          pageSize: "10",
          lang: "zh-CN",
          highlight: false,
          recordIP: false,
          serverURLs: "",
        });
      });
    });
  </script>
  <noscript>Please enable JavaScript to view the
    <a target="_blank" href="https://valine.js.org" rel="nofollow noopener noopener">comments powered by Valine.</a>
  </noscript>


              </article>
            
          </article>
        </div>
      </div>
    </div>
    
      <div class="d-none d-lg-block col-lg-2 toc-container" id="toc-ctn">
        <div id="toc">
  <p class="toc-header"><i class="iconfont icon-list"></i>&nbsp;目录</p>
  <div class="toc-body" id="toc-body"></div>
</div>

      </div>
    
  </div>
</div>

<!-- Custom -->


    

    
      <a id="scroll-top-button" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v"
                 for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>
    

    
  </main>

  <footer class="text-center mt-5 py-3">
  <div class="footer-content">
    

  </div>
  
  <div class="statistics">
    
    

    
      
        <!-- 不蒜子统计PV -->
        <span id="busuanzi_container_site_pv" style="display: none">
            总访问量 
            <span id="busuanzi_value_site_pv"></span>
             次
          </span>
      
      
        <!-- 不蒜子统计UV -->
        <span id="busuanzi_container_site_uv" style="display: none">
            总访客数 
            <span id="busuanzi_value_site_uv"></span>
             人
          </span>
      
    
  </div>


  
  <!-- 备案信息 -->
  <div class="beian">
    <span>
      <a href="http://beian.miit.gov.cn/" target="_blank" rel="nofollow noopener">
        豫ICP备20009912号-1
      </a>
    </span>
    
  </div>


  
</footer>

<!-- SCRIPTS -->

  <script  src="https://cdn.jsdelivr.net/npm/nprogress@0.2.0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/nprogress@0.2.0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":true,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js" ></script>
<script  src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.min.js" ></script>
<script  src="/js/debouncer.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>

<!-- Plugins -->


  
    
      <script  src="/js/lazyload.js" ></script>
    
  



  
    
  



  <script  src="https://cdn.jsdelivr.net/npm/tocbot@4.12.0/dist/tocbot.min.js" ></script>



  <script  src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js" ></script>



  <script  src="https://cdn.jsdelivr.net/npm/anchor-js@4.3.0/anchor.min.js" ></script>



  <script defer src="https://cdn.jsdelivr.net/npm/clipboard@2.0.6/dist/clipboard.min.js" ></script>



  <script defer src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" ></script>




  <script  src="https://cdn.jsdelivr.net/npm/typed.js@2.0.11/lib/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var title = document.getElementById('subtitle').title;
      
      typing(title)
      
    })(window, document);
  </script>



  <script  src="/js/local-search.js" ></script>
  <script>
    (function () {
      var path = "http://qiniuyun.quancundexiwang.wang/xmlSearch.xml";
      var inputArea = document.querySelector("#local-search-input");
      inputArea.onclick = function () {
        searchFunc(path, 'local-search-input', 'local-search-result');
        this.onclick = null
      }
    })()
  </script>















<!-- 主题的启动项 保持在最底部 -->
<script  src="/js/boot.js" ></script>



</body>
</html>
